<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>角色列表</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="/Public/admin/favicon.ico">
    <link href="/Public/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/admin/css/animate.css" rel="stylesheet">
    <link href="/Public/admin/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<include file="Admin@Index:cache" />
<body class="gray-bg contacts">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox">
                <div class="ibox-content">
                    <br>
                    <h3><a href="<{$SRVER_NAME}>/admin.php/indexadm.php/User/admin_list" style="color:black">客服管理-</a><a href="javascript:void(0)" style="color:#999999">角色列表</a><a style="float:right" class="btn btn-primary" href="<{$SRVER_NAME}>/admin.php/CustomerService/addrole">添加角色</a></h3>
                    <br>
                    <table class="table table-striped table-hover">
                        <tbody>
                        <tr>
                            <th class="">编号</th>
                            <th class="">职位名称</th>
                            <th>创建时间</th>
                            <th class="client-status">操作</th>
                        </tr>
                        <volist name="list" id="list">
                            <tr>
                                <td class=""><{$list.id}></td>
                                <td><{$list.name}></td>
                                <td class=""><{$list.ctime}></td>
                                <td class="client-status">
                                    <a class="btn btn-success btn-rounded" rid="<{$list.id}>" href="<{$SRVER_NAME}>/admin.php/CustomerService/modify_power/rid/<{$list.id}>">修改权限</a>
                                    <a class="btn btn-danger btn-rounded" rid="<{$list.id}>" href="javascript:void(0);" onclick="del_role('<{$list.id}>');" >删除</a>
                                </td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 全局js -->
<script src="/Public/admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/admin/js/bootstrap.min.js?v=3.3.6"></script>

<script src="/Public/admin/js/plugins/layer/layer.min.js"></script>
<!-- 自定义js -->
<script src="/Public/admin/js/content.js?v=1.0.0"></script>


<script>
    $(document).ready(function () {
        $('.contact-box').each(function () {
            animationHover(this, 'pulse');
        });
    });

    function del_role(rid){
        var check=confirm('是否确定删除该角色？');
        if(!check){
            return false;
        }
        $.post('<{$SRVER_NAME}>/admin.php/CustomerService/del_role',{rid:rid},function(data){
            if(data.code=='1001'){
                window.location.reload();
            }else{
                if(data.status=='0'){
                    layer.alert(data.info);
                }else{
                    layer.alert(data.result);
                }
            }
        });
    }
</script>


</body>

</html>
